home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HPAVC
/
HPAVC CD-ROM.iso
/
FNTPAK32.ZIP
/
C.EXE
/
DEMOBRIT.C
< prev
next >
Wrap
C/C++ Source or Header
|
1995-08-16
|
2KB
|
101 lines
/**********************************************************************
DemoBrit.C Copyright 1994, Rob W. Smetana
Turn Screen Swapping ON if appropriate.
Demonstrate: BrightBG \ all in
DefaultPalette )
DarkBlue / Video.Obj
Not demonstrated: GetMonitor
NOTE: All parameters are passed by VALUE -- EXCEPT Row and Column
in rsButtonPressed.
Font_Pak.H declares/prototypes all Font Pak functions.
REQUIRES:
Graphics library may be required for:
_setvideomode();
_settextcolor();
_outtext ();
**********************************************************************/
#include <font_pak.h> /* for declarations -- PLEASE READ */
#include <graph.h>
void PrintDemo (int Normal_Brite);
int main (void)
{
int Normal_Brite, WhichOption, Row, Col;
_setvideomode(_TEXTC80);
Normal_Brite = 0; PrintDemo (Normal_Brite);
_outtext("\n");
Normal_Brite = 16; PrintDemo (Normal_Brite);
printf("\nNormal colors. Press <SPACE>.");
getch();
printf("\nDemonstrate BrightBG. Press <SPACE>.");
WhichOption = 1;
BRIGHTBG (WhichOption);
getch();
printf("\n and back to normal. Press <SPACE>.");
WhichOption = 0;
BRIGHTBG (WhichOption);
getch();
printf("\nDemonstrate Default Palette -- with BOTH blinking & bright bg. Press <SPACE>.");
WhichOption = 2;
DEFAULTPALETTE (WhichOption);
getch();
printf("\n and back to normal. Press <SPACE>.");
WhichOption = 0;
DEFAULTPALETTE (WhichOption);
getch();
printf("\nDemonstrate Dark Blue (may be Grey in C). Press <SPACE>.");
DARKBLUE();
getch();
printf("\n and back to normal. Press <SPACE>.\n");
WhichOption = 0;
DEFAULTPALETTE (WhichOption);
getch();
return (0);
}
void PrintDemo (Normal_Brite)
{
short ForeColor;
long BKColor, normal;
for (BKColor = 0; BKColor <8; BKColor ++)
{
_setbkcolor(BKColor);
_outtext("\n");
for (ForeColor = Normal_Brite; ForeColor <15+ Normal_Brite; ForeColor ++)
{
_settextcolor(ForeColor);
_outtext(" F~P ");
}
}
}